package com.itheima.wms.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.itheima.pinda.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 实体类
 * 库位
 * </p>
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@SuperBuilder
@TableName("wms_location")
@ApiModel(value = "Location", description = "库位")
public class LocationEntity extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 仓库id
     */
    @ApiModelProperty(value = "货主")
    @TableField(value = "owner_id")
    private Long ownerId;

    /**
     * 仓库id
     */
    @ApiModelProperty(value = "仓库id")
    @NotNull(message = "仓库id不能为空", groups = {Save.class})
    @TableField(value = "warehouse_id")
    private Long warehouseId;

    /**
     * 库区id
     */
    @ApiModelProperty(value = "库区id")
    @NotNull(message = "库区id不能为空", groups = {Save.class})
    @TableField(value = "area_id")
    private Long areaId;
    /**
     * 编码
     */
    @ApiModelProperty(value = "编码")
    @NotEmpty(message = "编码不能为空", groups = {Save.class})
    @Length(max = 50, message = "编码长度不能超过50")
    @TableField(value = "code")
    private String code;
    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    @NotEmpty(message = "名称不能为空", groups = {Save.class})
    @Length(max = 50, message = "名称长度不能超过50")
    @TableField(value = "name")
    private String name;
    /**
     * 温度类型 常温:CW、冷藏:LC、恒温:HW
     */
    @ApiModelProperty(value = "温度类型 常温:CW、冷藏:LC、恒温:HW")
    @NotEmpty(message = "温度类型 常温:CW、冷藏:LC、恒温:HW不能为空", groups = {Save.class})
    @Length(max = 10, message = "温度类型 常温:CW、冷藏:LC、恒温:HW长度不能超过10")
    @TableField(value = "temperature_type")
    private String temperatureType;
    /**
     * 承重类型 重型:ZX、轻型:QX
     */
    @ApiModelProperty(value = "承重类型 重型:ZX、轻型:QX")
    @NotEmpty(message = "承重类型 重型:ZX、轻型:QX不能为空", groups = {Save.class})
    @Length(max = 10, message = "承重类型 重型:ZX、轻型:QX长度不能超过10")
    @TableField(value = "bearing_type")
    private String bearingType;
    /**
     * 用途类型 入库缓存区：RKHCQ 出库缓存区：CKHCQ 存储区：CCQ  分拣区：FJQ 质检区：ZJQ
     */
    @ApiModelProperty(value = "用途类型 入库缓存区：RKHCQ 出库缓存区：CKHCQ 存储区：CCQ  分拣区：FJQ 质检区：ZJQ")
    @NotEmpty(message = "用途类型 入库缓存区：RKHCQ 出库缓存区：CKHCQ 存储区：CCQ  分拣区：FJQ 质检区：ZJQ不能为空", groups = {Save.class})
    @Length(max = 10, message = "用途类型 入库缓存区：RKHCQ 出库缓存区：CKHCQ 存储区：CCQ  分拣区：FJQ 质检区：ZJQ长度不能超过10")
    @TableField(value = "use_type")
    private String useType;
    /**
     * 使用状态：0空闲 1占用
     */
    @ApiModelProperty(value = "使用状态：0空闲 1未满 2已满")
    @TableField(value = "use_status")
    private Integer useStatus;
    /**
     * 承载上限
     */
    @ApiModelProperty(value = "承载上限")
    @TableField(value = "max_num")
    private Integer maxNum;
    /**
     * 承载体积
     */
    @ApiModelProperty(value = "承载体积")
    @NotNull(message = "承载体积不能为空", groups = {Save.class})
    @TableField(value = "max_volume")
    private java.math.BigDecimal maxVolume;
    /**
     * 承载重量
     */
    @ApiModelProperty(value = "承载重量")
    @TableField(value = "max_weight")
    private java.math.BigDecimal maxWeight;
    /**
     * 排
     */
    @ApiModelProperty(value = "排")
    @TableField(value = "location_row")
    private Integer locationRow;
    /**
     * 列
     */
    @ApiModelProperty(value = "列")
    @TableField(value = "location_column")
    private Integer locationColumn;
    /**
     * 层
     */
    @ApiModelProperty(value = "层")
    @TableField(value = "location_layer")
    private Integer locationLayer;
    /**
     * 长
     */
    @ApiModelProperty(value = "长")
    @TableField(value = "location_length")
    private java.math.BigDecimal locationLength;
    /**
     * 宽
     */
    @ApiModelProperty(value = "宽")
    @TableField(value = "location_width")
    private java.math.BigDecimal locationWidth;
    /**
     * 高
     */
    @ApiModelProperty(value = "高")
    @TableField(value = "location_high")
    private java.math.BigDecimal locationHigh;
    /**
     * 状态 0 停用 1启用
     */
    @ApiModelProperty(value = "状态 0 停用 1启用")
    @TableField(value = "status")
    private Integer status;
    /**
     * 状态 0 停用 1启用
     */
    @ApiModelProperty(value = "状态 0 冻结 1正常")
    @TableField(value = "frozen")
    private Integer frozen;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Length(max = 255, message = "备注长度不能超过255")
    @TableField(value = "remark")
    private String remark;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @Length(max = 50, message = "创建人长度不能超过50")
    @TableField(value = "create_name", fill = FieldFill.INSERT)
    private String createName;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    @Length(max = 50, message = "更新人长度不能超过50")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE)
    private String updateName;
    /**
     * 逻辑删除 0 删除
     */
    @ApiModelProperty(value = "逻辑删除 0 删除")
    @TableField(value = "logic_del")
    private Integer logicDel;
}
